home *** CD-ROM | disk | FTP | other *** search
/ Network Support Library / RoseWare - Network Support Library.iso / apidev / shotbl.arc / SHTABLES.C < prev    next >
Text File  |  1989-01-03  |  19KB  |  608 lines

  1. /*****************************************************************************
  2.  *
  3.  * Program Name:  SHELL INTERNAL TABLE DISPLAY
  4.  *
  5.  * Filename:      shtables.c
  6.  *
  7.  * Date Created:  November 18, 1988
  8.  *
  9.  * Version:          1.0
  10.  *
  11.  * Programmers:      Thomas Brough
  12.  *
  13.  * Files used:      window.c, maptable.asm, screen.asm, video.h, typedef.h
  14.  *
  15.  * Date Modified: 
  16.  *
  17.  * Modifications: 
  18.  *
  19.  * Comments:
  20.  *
  21.  ****************************************************************************/
  22.  
  23. #include <stdio.h>
  24. #include <dos.h>
  25. #include "video.h"
  26. #include "typedef.h"
  27.  
  28. NAME            SNTable[8];
  29. BYTE            DSTable[32];
  30. BYTE            DFTable[32];
  31. BYTE            DHTable[32];
  32. SERVER            CITable[8];
  33.  
  34. int        currentLocation=1, prevLocation=1;
  35.  
  36. main()
  37. {
  38.     char    acode=0, ecode=0;
  39.     
  40.     InitTables();
  41.     SetUpScreen();
  42.     while ( 1 )
  43.     {
  44.         getcha( &acode, &ecode );
  45.         prevLocation = currentLocation;
  46.         if ( ecode )
  47.         {
  48.             switch( acode )
  49.             {
  50.                 case 'S':
  51.                 case 's':
  52.                     currentLocation=1;
  53.                     Menu( currentLocation, prevLocation );
  54.                     break; 
  55.                 case 'H':
  56.                 case 'h':
  57.                     currentLocation=2;
  58.                     Menu( currentLocation, prevLocation );
  59.                     break;
  60.                 case 'F':
  61.                 case 'f':
  62.                     currentLocation=3;
  63.                     Menu( currentLocation, prevLocation );
  64.                     break;
  65.                 case 'D':
  66.                 case 'd':
  67.                     currentLocation=4;
  68.                     Menu( currentLocation, prevLocation );
  69.                     break;
  70.                 case 'N':
  71.                 case 'n':
  72.                     currentLocation=5;
  73.                     Menu( currentLocation, prevLocation );
  74.                     break;
  75.                 case 'A':
  76.                 case 'a':
  77.                     currentLocation=6;
  78.                     Menu( currentLocation, prevLocation );
  79.                     break;
  80.                 case 'Q':
  81.                 case 'q':
  82.                     currentLocation=7;
  83.                     Menu( currentLocation, prevLocation );
  84.                     break;
  85.                 case 13:
  86.                     Execute( currentLocation );     /*  enter key */
  87.                     break;
  88.                 case 27:
  89.                     Execute( 7 );
  90.                     break;
  91.                 default:
  92.                     break;
  93.             }  /* switch */
  94.         } /* if ecode */
  95.         else
  96.         {
  97.             switch( acode )
  98.             {
  99.                 case 72:
  100.                     if (currentLocation == 1)       /* up arrow key */
  101.                         currentLocation = 7;
  102.                     else
  103.                         currentLocation--;
  104.                     Menu( currentLocation, prevLocation );
  105.                     break;
  106.                 case 80:
  107.                     if (currentLocation == 7)       /* down arrow key */
  108.                         currentLocation = 1;
  109.                     else
  110.                         currentLocation++;
  111.                     Menu( currentLocation, prevLocation );
  112.                     break;
  113.                 default:
  114.                     break;
  115.             }    /* switch */
  116.         } /* else */
  117.     } /* while */
  118. } /* main */
  119.  
  120. getcha(acode, ecode)
  121. char *ecode, *acode;
  122. {
  123.     union REGS inregs, outregs;
  124.  
  125.     inregs.h.ah = 8;
  126.     intdos( &inregs, &outregs);
  127.     *ecode = outregs.h.al;
  128.     if (*ecode == 0)
  129.        {
  130.            inregs.h.ah = 8;
  131.            intdos(&inregs, &outregs);
  132.            *acode = outregs.h.al;
  133.            return(0);
  134.         }
  135.     else
  136.        {
  137.           *acode = *ecode;
  138.           *ecode = 1; 
  139.        }
  140. }
  141.  
  142. ErrorExit( errorString, ccode )
  143. char *errorString;
  144. int    ccode;
  145. {
  146.     ClearScreen();
  147.     SetCursorPosition( 10, 10 );
  148.     printf( "Error: %s", errorString );
  149.     exit( ccode );
  150. }
  151.  
  152. SetUpScreen()
  153. {
  154.     mode = GetVideoMode();
  155.     SetVideoSegmentAddress( mode, &destseg );
  156.     if (destseg == 0xB000)
  157.     {
  158.         NORMAL = 0x07;           /* monochrome display */
  159.         REVERSE = 0x70;
  160.         BOLD = 0x0F;
  161.         BACKGROUND = 0x07;
  162.     }
  163.     else
  164.     {
  165.         NORMAL = 0x7F;           /* color display */
  166.         REVERSE = 0x1E;
  167.         BOLD = 0x7E;
  168.         BACKGROUND = 0x70;
  169.     }
  170.      ColorScreen( BACKGROUND );
  171.     DrawWindow( 1, 1, 24, 80, destseg, BOLD );
  172.     DrawWindow( 1,1,9,26, destseg, BOLD );
  173.     PrintStringAttr( "This utility displays some of the internal tables", NORMAL, MESSAGE3, destseg );
  174.     PrintStringAttr( "of the Novell NetWare workstation shell.", NORMAL, MESSAGE4, destseg );
  175.     RemoveCursor();
  176.     PrintStringAttr( " Connection Info. Table ", REVERSE, CITABLE, destseg );
  177.     PrintStringAttr( " Drive Handle Table     ", NORMAL, DHTABLE, destseg );
  178.     PrintStringAttr( " Drive Flag Table       ", NORMAL, DFTABLE, destseg );
  179.     PrintStringAttr( " Drive Connection ID    ", NORMAL, DSTABLE, destseg );
  180.     PrintStringAttr( " Server Name Table      ", NORMAL, SNTABLE, destseg);
  181.     PrintStringAttr( " All Drive Tables       ", NORMAL, ALTABLE, destseg);
  182.     PrintStringAttr( " Exit to DOS            ", NORMAL, QUIT, destseg);
  183. }
  184.  
  185. Menu( curr, prev )
  186. int        curr, prev;
  187. {
  188.     switch(prev)
  189.     {
  190.         case 1:
  191.             PrintStringAttr( " Connection Info. Table ", NORMAL, CITABLE, destseg );
  192.             break;
  193.         case 2:
  194.             PrintStringAttr( " Drive Handle Table     ", NORMAL, DHTABLE, destseg );
  195.             break;
  196.         case 3:
  197.             PrintStringAttr( " Drive Flag Table       ", NORMAL, DFTABLE, destseg );
  198.             break;
  199.         case 4:
  200.             PrintStringAttr( " Drive Connection ID    ", NORMAL, DSTABLE, destseg );
  201.             break;
  202.         case 5:
  203.             PrintStringAttr( " Server Name Table      ", NORMAL, SNTABLE, destseg );
  204.             break;
  205.         case 6:
  206.             PrintStringAttr( " All Drive Tables       ", NORMAL, ALTABLE, destseg );
  207.             break;
  208.         case 7:
  209.             PrintStringAttr( " Exit to DOS            ", NORMAL, QUIT, destseg );
  210.             break;
  211.     } /* switch */
  212.  
  213.     switch(curr)
  214.     {
  215.         case 1:
  216.             PrintStringAttr( " Connection Info. Table ", REVERSE, CITABLE, destseg );
  217.             break;
  218.         case 2:
  219.             PrintStringAttr( " Drive Handle Table     ", REVERSE, DHTABLE, destseg );
  220.             break;
  221.         case 3:
  222.             PrintStringAttr( " Drive Flag Table       ", REVERSE, DFTABLE, destseg );
  223.             break;
  224.         case 4:
  225.             PrintStringAttr( " Drive Connection ID    ", REVERSE, DSTABLE, destseg );
  226.             break;
  227.         case 5:
  228.             PrintStringAttr( " Server Name Table      ", REVERSE, SNTABLE, destseg);
  229.             break;
  230.         case 6:    
  231.             PrintStringAttr( " All Drive Tables       ", REVERSE, ALTABLE, destseg );
  232.             break;
  233.         case 7:
  234.             PrintStringAttr( " Exit to DOS            ", REVERSE, QUIT, destseg);
  235.             break;
  236.     } /* switch */
  237. }
  238.  
  239. /*
  240. **  This function will multiplex to the appropriate procedure.
  241. */
  242.  
  243. Execute( curr )
  244. int        curr;
  245. {
  246.     switch(curr) {
  247.     case 1:
  248.         ShowConnectionInfoTable();
  249.         break;
  250.     case 2:
  251.         ShowDriveHandleTable();
  252.         break;
  253.     case 3:
  254.         ShowDriveFlagTable();
  255.         break;
  256.     case 4:
  257.         ShowDriveServerTable();
  258.         break;
  259.     case 5:
  260.         ShowServerNameTable();
  261.         break;
  262.     case 6:
  263.         ShowAllDriveTables();
  264.         break;
  265.     case 7:
  266.         Quit();
  267.         break;
  268.     default:
  269.         break;
  270.     } /* switch */
  271. }
  272.  
  273. /*
  274. **  This function will terminate execution and restore the cursor.
  275. */
  276. Quit()
  277. {
  278.     if (destseg == 0xB000)
  279.         RestoreCursor( 0 );
  280.     else
  281.         RestoreCursor( 1 );
  282.     ClearScreen();
  283.     exit( 0 );
  284. }
  285.  
  286. ShowConnectionInfoTable()
  287. {
  288.     int                i, j;
  289.  
  290.     CleanUpScreen();
  291.     PrintStringAttr( "The Connection Info table is used by the shell   ", NORMAL, MESSAGE1, destseg );
  292.     PrintStringAttr( "when sending packets to different file servers.  ", NORMAL, MESSAGE2, destseg );
  293.     PrintStringAttr( "This table contains the complete network address ", NORMAL, MESSAGE3, destseg );
  294.     PrintStringAttr( "for each of the file servers it is communicating ", NORMAL, MESSAGE4, destseg );
  295.     PrintStringAttr( "with, as well as the nearest router in case the  ", NORMAL, MESSAGE5, destseg );
  296.     PrintStringAttr( "file server exists on another physical network.  ", NORMAL, MESSAGE6, destseg );
  297.     PrintStringAttr( "Also kept are packet sequence numbers and timeout", NORMAL, MESSAGE7, destseg );
  298.     PrintStringAttr( "values to coordinate requests with file servers. ", NORMAL, MESSAGE8, destseg );
  299.  
  300.     PrintStringAttr( "C O N N E C T I O N  I N F O  T A B L E ", BOLD, TITLE, destseg );
  301.     PrintStringAttr( "Conn  Order       File Server         Recv.    Router     Seq. Conn Conn  Max ", REVERSE, HEADER1, destseg );
  302.     PrintStringAttr( "InUse  No.      Network Address      Timeout    Add.      No.   No. Stat Time ", REVERSE, HEADER2, destseg );
  303.     
  304.     for (i=0;i<8;i++)
  305.     {
  306.         SetCursorPosition( i+15, 2 );
  307.         switch( CITable[i].InUseFlag )
  308.         {
  309.             case 0xFF:
  310.                 printf( "YES");
  311.                 break;
  312.             case 0x00:
  313.                 printf( "NO");
  314.                 break;
  315.             default:
  316.                 break;
  317.         }
  318.         SetCursorPosition( i+15, 8 );
  319.         printf( "%d", CITable[i].ConnID );
  320.         SetCursorPosition( i+15, 11 );
  321.         for (j=0;j<4;j++)
  322.             printf("%02X", CITable[i].ServerNetAddress[j] );
  323.         printf(":");
  324.         for (j=0;j<6;j++)
  325.             printf("%02X", CITable[i].ServerNodeAddress[j] );
  326.         printf(":");
  327.         for (j=0;j<2;j++)
  328.             printf("%02X", CITable[i].ServerSocket[j] );
  329.         SetCursorPosition( i+15, 39 );
  330.         for (j=0;j<2;j++)
  331.             printf("%d", CITable[i].ReceiveTimeOut[j] );
  332.         SetCursorPosition( i+15, 45 );
  333.         for (j=0;j<6;j++)
  334.             printf("%02X", CITable[i].RouterAddress[j] );
  335.         SetCursorPosition( i+15, 59 );
  336.         printf( "%d", CITable[i].SeqNumber );
  337.         SetCursorPosition( i+15, 64 );
  338.         switch( CITable[i].LogicalConnNumber )
  339.         {
  340.             case 0xFF:
  341.                 printf( "NONE" );
  342.                 break;
  343.             default:
  344.                 printf( "%d", CITable[i].LogicalConnNumber );
  345.                 break;
  346.         }
  347.         SetCursorPosition( i+15, 70 );
  348.         switch( CITable[i].ConnStatus )
  349.         {
  350.             case 0xFF:
  351.                 printf( "OK" );
  352.                 break;
  353.             default:
  354.                 printf( "--" );
  355.                 break;
  356.         }
  357.         SetCursorPosition( i+15, 74 );
  358.         for (j=0;j<2;j++)
  359.             printf( "%d", CITable[i].MaxTimeOut[j] );
  360.     }
  361. }
  362.  
  363. ShowDriveHandleTable()
  364. {
  365.     int                i;
  366.  
  367.     CleanUpScreen();
  368.     PrintStringAttr( "The Drive Handle Table shows the directory handle", NORMAL, MESSAGE1, destseg );
  369.     PrintStringAttr( "associated with each mapped drive, whether that  ", NORMAL, MESSAGE2, destseg );
  370.     PrintStringAttr( "drive is permanent or temporary.  The first 26   ", NORMAL, MESSAGE3, destseg );
  371.     PrintStringAttr( "drive letters [A..Z] can be mapped as permanent  ", NORMAL, MESSAGE4, destseg );
  372.     PrintStringAttr( "drives.  Any of the 32 drive letters [A..`] can  ", NORMAL, MESSAGE5, destseg );
  373.     PrintStringAttr( "be mapped as temporary drives.  A temporary drive", NORMAL, MESSAGE6, destseg );
  374.     PrintStringAttr( "only remains for the lifetime of the application ", NORMAL, MESSAGE7, destseg );
  375.     PrintStringAttr( "that created the temporary drive.                ", NORMAL, MESSAGE8, destseg );
  376.     PrintStringAttr( "Permanent Drives:", BOLD, TITLEA, destseg );
  377.     PrintStringAttr( "D R I V E    H A N D L E    T A B L E", BOLD, TITLE+6, destseg );
  378.     PrintStringAttr( " A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z ", REVERSE, HEADER1, destseg );
  379.     PrintStringAttr( "Temporary Drives:", BOLD, TITLEB, destseg );
  380.     PrintStringAttr( " [  \\  ]  ^  _  `                                                             ", REVERSE, HEADER3, destseg );
  381.     
  382.     SetCursorPosition( 13, 1 );
  383.     for (i=0;i<26;i++)
  384.         printf("%02d ", DHTable[i]);
  385.     SetCursorPosition( 19, 1 );
  386.     for (i=26;i<32;i++)
  387.         printf("%02d ", DHTable[i]);
  388. }
  389.  
  390. ShowDriveFlagTable()
  391. {
  392.     int                i;
  393.  
  394.     CleanUpScreen();
  395.     PrintStringAttr( "─────────── LEGEND ──────────────────────────────", NORMAL, MESSAGE1, destseg );
  396.     PrintStringAttr( "                                                 ", NORMAL, MESSAGE2, destseg );
  397.     PrintStringAttr( "  00 = Not allocated                             ", NORMAL, MESSAGE3, destseg );
  398.     PrintStringAttr( "  01 = PERMANENT network drive                   ", NORMAL, MESSAGE4, destseg );
  399.     PrintStringAttr( "  02 = TEMPORARY network drive                   ", NORMAL, MESSAGE5, destseg );
  400.     PrintStringAttr( "  80 = local drive                               ", NORMAL, MESSAGE6, destseg );
  401.     PrintStringAttr( "  81 = local drive-now a PERMANENT network drive ", NORMAL, MESSAGE7, destseg );
  402.     PrintStringAttr( "  82 = local drive-now a TEMPORARY network drive ", NORMAL, MESSAGE8, destseg );
  403.  
  404.     PrintStringAttr( "Permanent Drives:", BOLD, TITLEA, destseg );
  405.     PrintStringAttr( "D R I V E    F L A G    T A B L E", BOLD, TITLE+10, destseg );
  406.     PrintStringAttr( " A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z ", REVERSE, HEADER1, destseg );
  407.     PrintStringAttr( "Temporary Drives:", BOLD, TITLEB, destseg );
  408.     PrintStringAttr( " [  \\  ]  ^  _  `                                                             ", REVERSE, HEADER3, destseg );
  409.     
  410.     SetCursorPosition( 13, 1 );
  411.     for (i=0;i<26;i++)
  412.         printf("%02X ", DFTable[i]);
  413.     SetCursorPosition( 19, 1 );
  414.     for (i=26;i<32;i++)
  415.         printf("%02X ", DFTable[i]);
  416. }
  417.  
  418. ShowDriveServerTable()
  419. {
  420.     int                i;
  421.  
  422.     CleanUpScreen();
  423.     PrintStringAttr( "The Drive Connection ID table shows the server   ", NORMAL, MESSAGE1, destseg );
  424.     PrintStringAttr( "connection ID associated with each drive, whether", NORMAL, MESSAGE2, destseg );
  425.     PrintStringAttr( "that drive is permanent or temporary.  Currently,", NORMAL, MESSAGE3, destseg );
  426.     PrintStringAttr( "the shell can support up to 8 attachments, so the", NORMAL, MESSAGE4, destseg );
  427.     PrintStringAttr( "value for each drive will be from 1-8, indicating", NORMAL, MESSAGE5, destseg );
  428.     PrintStringAttr( "which of the possible 8 file servers each drive  ", NORMAL, MESSAGE6, destseg );
  429.     PrintStringAttr( "is attached to.  An value of 0 indicates that the", NORMAL, MESSAGE7, destseg );
  430.     PrintStringAttr( "drive is not currently mapped to any server.     ", NORMAL, MESSAGE8, destseg );
  431.     
  432.     PrintStringAttr( "Permanent Drives:", BOLD, TITLEA, destseg );
  433.     PrintStringAttr( "D R I V E   C O N N E C T I O N   I D   T A B L E", BOLD, TITLE-2, destseg );
  434.     PrintStringAttr( " A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z ", REVERSE, HEADER1, destseg );
  435.     PrintStringAttr( "Temporary Drives:", BOLD, TITLEB, destseg );
  436.     PrintStringAttr( " [  \\  ]  ^  _  `                                                             ", REVERSE, HEADER3, destseg );
  437.     
  438.     SetCursorPosition( 13, 1 );
  439.     for (i=0;i<26;i++)
  440.         printf(" %01d ", DSTable[i]);
  441.     SetCursorPosition( 19, 1 );
  442.     for (i=26;i<32;i++)
  443.         printf(" %01d ", DSTable[i]);
  444. }
  445.  
  446. ShowServerNameTable()
  447. {
  448.     int                i;
  449.  
  450.     CleanUpScreen();
  451.     PrintStringAttr( "The Server Name Table shows the actual file      ", NORMAL, MESSAGE1, destseg );
  452.     PrintStringAttr( "server name string associated with each          ", NORMAL, MESSAGE2, destseg );
  453.     PrintStringAttr( "connection ID.  A Connection ID can be thought of", NORMAL, MESSAGE3, destseg );
  454.     PrintStringAttr( "as the index value into the Server Mapping Table.", NORMAL, MESSAGE4, destseg );
  455.     PrintStringAttr( "In other words, the first entry in the Server    ", NORMAL, MESSAGE5, destseg );
  456.     PrintStringAttr( "Name table corresponds to the first entry in the ", NORMAL, MESSAGE6, destseg );
  457.     PrintStringAttr( "Server Mapping Table.                            ", NORMAL, MESSAGE7, destseg );
  458.     PrintStringAttr( "                                                 ", NORMAL, MESSAGE8, destseg );
  459.  
  460.     PrintStringAttr( "S E R V E R   N A M E   T A B L E", BOLD, TITLE+8, destseg );
  461.     PrintStringAttr( "Conn         File Server                                                      ", REVERSE, HEADER1, destseg );
  462.     PrintStringAttr( " ID             Name                                                          ", REVERSE, HEADER2, destseg );
  463.     
  464.     for (i=0;i<8;i++)
  465.     {
  466.         SetCursorPosition( i+15, 3 );
  467.         printf("%d        %s", i+1, SNTable[i].serverName );
  468.     }
  469. }
  470.  
  471. ShowAllDriveTables()
  472. {
  473.     int                i;
  474.     
  475.     CleanUpScreen();
  476.     PrintStringAttr( "This screen shows the relationships between the  ", NORMAL, MESSAGE1, destseg );
  477.     PrintStringAttr( "Drive Handle Table, the Drive Flag Table, and the", NORMAL, MESSAGE2, destseg );
  478.     PrintStringAttr( "Drive Server Table.  The display order is:       ", NORMAL, MESSAGE3, destseg );
  479.     PrintStringAttr( "                                                 ", NORMAL, MESSAGE4, destseg );
  480.     PrintStringAttr( "A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P...", NORMAL, MESSAGE5, destseg );
  481.     PrintStringAttr( "Drive Handle Information  (decimal values)       ", NORMAL, MESSAGE6, destseg );
  482.     PrintStringAttr( "Drive Flag Information  (hexadecimal values)     ", NORMAL, MESSAGE7, destseg );
  483.     PrintStringAttr( "Drive Server Information (decimal values)        ", NORMAL, MESSAGE8, destseg );
  484.     
  485.     PrintStringAttr( "Permanent Drives:", BOLD, TITLEA, destseg );
  486.     PrintStringAttr( "D R I V E   S E R V E R   T A B L E", BOLD, TITLE+4, destseg );
  487.     PrintStringAttr( " A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z ", REVERSE, HEADER1, destseg );
  488.     PrintStringAttr( "Temporary Drives:", BOLD, TITLEB, destseg );
  489.     PrintStringAttr( " [  \\  ]  ^  _  `                                                             ", REVERSE, HEADER3, destseg );
  490.     
  491.     SetCursorPosition( 13, 1 );
  492.     for (i=0;i<26;i++)
  493.         printf("%02d ", DHTable[i]);
  494.     SetCursorPosition( 19, 1 );
  495.     for (i=26;i<32;i++)
  496.         printf("%02d ", DHTable[i]);
  497.     SetCursorPosition( 14, 1 );
  498.     for (i=0;i<26;i++)
  499.         printf("%02X ", DFTable[i]);
  500.     SetCursorPosition( 20, 1 );
  501.     for (i=26;i<32;i++)
  502.         printf("%02X ", DFTable[i]);
  503.     SetCursorPosition( 15, 1 );
  504.     for (i=0;i<26;i++)
  505.         printf(" %01d ", DSTable[i]);
  506.     SetCursorPosition( 21, 1 );
  507.     for (i=26;i<32;i++)
  508.         printf(" %01d ", DSTable[i]);
  509. }
  510.  
  511. CleanUpScreen()
  512. {
  513.     int    i;
  514.  
  515.     for (i = MESSAGE1;i < (MESSAGE8+160) ;i += 160)
  516.         PrintStringAttr("                                                   ",
  517.                             NORMAL, i, destseg );
  518.     for (i=10;i<23;i++)
  519.     {
  520.         PrintStringAttr( "                                                                              ",
  521.                             NORMAL, (i*160+2), destseg );        
  522.     }
  523. }
  524. InitTables()
  525. {
  526.     char far         *p;
  527.     WORD            tableSegment;
  528.     WORD            tableOffset;
  529.      int                i;
  530.     unsigned int    dataseg, dataoff;
  531.  
  532.     void            GetConnectionInfoTable();
  533.     void            GetDriveHandleTable();
  534.     void            GetDriveFlagTable();
  535.     void            GetDriveServerTable();
  536.     void            GetServerNameTable();
  537.  
  538.     p = (char far *)&CITable[0];
  539.     dataseg = FP_SEG( p );
  540.     dataoff = FP_OFF( p );
  541.     GetConnectionInfoTable( &tableSegment, &tableOffset) ;
  542.     if ( tableSegment == 0 )
  543.         ErrorExit( "You must load the NetWare shell to use this utility.", 1 );
  544.     for (i=0;i<8;i++)
  545.     {
  546.         movedata( tableSegment, tableOffset,
  547.             dataseg, dataoff, 32 );
  548.         dataoff+=32;
  549.         tableOffset+=32;
  550.     }
  551.  
  552.     p = (char far *)&DHTable[0];
  553.     dataseg = FP_SEG( p );
  554.     dataoff = FP_OFF( p );
  555.     GetDriveHandleTable( &tableSegment, &tableOffset );
  556.     if ( tableSegment == 0 )
  557.         ErrorExit( "You must load the NetWare shell to use this utility.", 1 );
  558.     for (i=0;i<32;i++)
  559.     {
  560.         movedata( tableSegment, tableOffset,
  561.             dataseg, dataoff, 1 );
  562.         dataoff++;
  563.         tableOffset++;
  564.     }
  565.  
  566.     p = (char far *)&DFTable[0];
  567.     dataseg = FP_SEG( p );
  568.     dataoff = FP_OFF( p );
  569.     GetDriveFlagTable( &tableSegment, &tableOffset );
  570.     if ( tableSegment == 0 )
  571.         ErrorExit( "You must load the NetWare shell to use this utility.", 1 );
  572.     for (i=0;i<32;i++)
  573.     {
  574.         movedata( tableSegment, tableOffset,
  575.             dataseg, dataoff, 1 );
  576.         dataoff++;
  577.         tableOffset++;
  578.     }
  579.     
  580.     p = (char far *)&DSTable[0];
  581.     dataseg = FP_SEG( p );
  582.     dataoff = FP_OFF( p );
  583.     GetDriveServerTable( &tableSegment, &tableOffset );
  584.     if ( tableSegment == 0 )
  585.         ErrorExit( "You must load the NetWare shell to use this utility.", 1 );
  586.     for (i=0;i<32;i++)
  587.     {
  588.         movedata( tableSegment, tableOffset,
  589.             dataseg, dataoff, 1 );
  590.         dataoff++;
  591.         tableOffset++;
  592.     }
  593.  
  594.     p = (char far *)&SNTable[0];
  595.     dataseg = FP_SEG( p );
  596.     dataoff = FP_OFF( p );
  597.     GetServerNameTable( &tableSegment, &tableOffset) ;
  598.     if ( tableSegment == 0 )
  599.         ErrorExit( "You must load the NetWare shell to use this utility.", 1 );
  600.     for (i=0;i<8;i++)
  601.     {
  602.         movedata( tableSegment, tableOffset,
  603.             dataseg, dataoff, 48 );
  604.         dataoff+=48;
  605.         tableOffset+=48;
  606.     }
  607. }
  608.